package com.hd.entity.sys;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.*;

import org.hibernate.validator.constraints.NotBlank;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * <p>
 *     部门
 * </p>
 * @author hzhh123
 * @time 2018年1月15日下午5:02:19
 **/
@Entity
@Table(name = "sys_org")
public class Org implements Serializable {
    private static final long serialVersionUID = 4045841662653710978L;

    /**
     * 主键id
     */
    @Id
    private String id;

    /**
     * 组织名
     */
    @NotBlank
    private String name;
    /**
     * 父级主键
     */
    private String pid;
    @Transient
    private String pName;

    /**
     * 地址
     */
    private String address;

    /**
     * 编号
     */
    @NotBlank
    private String code;

    /**
     * 图标
     */
    @JsonProperty("iconCls")
    private String icon;

    /**
     * 排序
     */
    private Integer seq;

    /**
     * 创建时间
     */
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "create_time")
    private Date createTime;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public Integer getSeq() {
        return seq;
    }

    public void setSeq(Integer seq) {
        this.seq = seq;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getpName() {
        return pName;
    }

    public void setpName(String pName) {
        this.pName = pName;
    }
}
